package web;


import spring.cloud.tasks.client.Client;
import spring.cloud.tasks.client.item_task_processor.Task;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public class scheduleStrategyList {
    public static void main(String[] args) throws Exception {
        HttpServletRequest request = null;
        String isManager = request.getParameter("workerManager");
        List<Task> taskScheduleInfoList = Client.getZooKeeperItemTaskDataManager().getTaskList();
        String ipIds = "";
        for (int i = 0; i < taskScheduleInfoList.size(); i++) {
            Task taskScheduleInfo = taskScheduleInfoList.get(i);


            String pauseOrResumeAction = "pauseTask";
            String pauseOrResumeActionName = "ֹͣ";
            String stsName = "����";
            if (Task.status_pause.equals(taskScheduleInfoList.get(i).getStatus())) {
                pauseOrResumeAction = "runOrRecoverTask";
                pauseOrResumeActionName = "�ָ�";
                stsName = "ֹͣ";
            }
            System.out.println("��������:" + taskScheduleInfo.getTaskId());//������д�����������ĺ������ַ�
            System.out.println("��������:" + taskScheduleInfo.getTaskId());
            System.out.println("�������:" + taskScheduleInfo.getTaskParameter());//���ŷָ���Key-Value�� ����������ΪSchedule����Ч����Ҫͨ��������������õ�
            System.out.println("IP��ַ(���ŷָ�)��" + taskScheduleInfo.getIpList());

            System.out.println("����߳�������:" + taskScheduleInfo.getTotalProcessorCount());//���з������ܹ����е��������
        }
    }

}